Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /
Chapter 3 - Page Formatting and Dialog Box Customization / Page Formatting and Dialog Box Customization Reference
Functions / Displaying the Custom Page Setup Dialog Box


GXFormatDialog

You can use the GXFormatDialog function to display the Custom Page Setup dialog box when the user chooses the Custom Page Setup menu item from the File menu.

gxDialogResult GXFormatDialog (gxFormat aFormat,
                              gxEditMenuRecord *anEditMenuRecord,
                              StringPtr title);
aFormat
A reference to the format object that specifies the values to display in the dialog box.
title
The title of the dialog box.
anEditMenuRecord
A structure for your application's Edit menu and its menu items.
function result
The user's response to the dialog box.
DESCRIPTION
After you use the GXFormatDialog function to display the Custom Page Setup dialog box, the user can specify formatting information for a format (which is not the default format). For example, the user can specify the paper size, orientation, and the default formatting printer.

In the anEditMenuRecord parameter you to specify an Edit menu structure to support the standard editing operations of cut, copy, paste, and clear in dialog boxes.

The GXFormatDialog function returns a response that is defined in a dialog box result enumeration. If the user chooses the Format button, the GXFormatDialog function returns gxOKSelected. If the user chooses the Cancel button, the function returns gxCancelSelected. If the user chooses the Remove button, the function returns gxRevertSelected.

If an error occurs, the function returns gxCancelSelected. Call the GXGetJobError function to determine which error occurred.

This function causes QuickDraw GX to send the gxFormatDialog message, which you can override to customize the Custom Page Setup dialog box.

Note that QuickDraw GX stores a user's responses to some dialog box items in the Custom Page Setup dialog box in a format collection.

SEE ALSO
Listing 3-9 on page 3-42 shows how to use the GXFormatDialog function to display the Custom Page Setup dialog box.

The Edit menu structure and the dialog box result enumeration are described in the chapter "Core Printing Features" in this book.

For information about customizing the Custom Page Setup dialog box, see "Adding Panels to Dialog Boxes" beginning on page 3-67.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help